package com.liwenfeng;

import com.liwenfeng.file.DeleteDir;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.function.BinaryOperator;

//-Djdk.invoke.LambdaMetafactory.dumpProxyClassFiles
//可以生成lambda函数对象的类
public class ClosureTest {
    public static void main(String[] args) throws ClassNotFoundException {
        int c = 10;
        BinaryOperator<Integer> lambda = (a, b) -> a + b + c;

        int add = new LambdaMethodReferenceTest().add(lambda);
        System.out.println(add);

        for (Method method : ClosureTest.class.getDeclaredMethods()) {
            System.out.println(method);
        }

        //System.out.println(lambda.getClass().getName());
        //com.liwenfeng.ClosureTest$$Lambda/0x0000025214003200

    }
}
